﻿using NB.MGJ.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NB.MGJ.Model
{
    public class CodeManage_Allot
    {
        /// <summary>
        /// ButtonId
        /// </summary>
        [Property("Key")]
        public int ID { get; set; }

        /// <summary>
        /// 流水号
        /// </summary>
        public string SerialNum { get; set; }

        /// <summary>
        /// 码功能
        /// </summary>
        public string CodeFunc { get; set; }

        /// <summary>
        /// 产品规格
        /// </summary>
        public string ApplyProductSize { get; set; }

        /// <summary>
        /// 分配产品Id
        /// </summary>
        public int ProductId { get; set; }

        /// <summary>
        /// 分配产品名称
        /// </summary>
        public string AllotProductName { get; set; }

        /// <summary>
        /// 分配品牌ID
        /// </summary>
        public int? BrandId { get; set; }

        /// <summary>
        /// 分配品牌名称
        /// </summary>
        public string BrandName { get; set; }

        /// <summary>
        /// 分配类型 0：号段分配  1：整批分配 2:手机码关联
        /// 默认值：0
        /// </summary>
        public int AllotType { get; set; }

        /// <summary>
        /// 分配批次ID
        /// </summary>
        public int? AllotBatchId { get; set; }

        /// <summary>
        /// 分配批次
        /// </summary>
        public string AllotBatch { get; set; }

        /// <summary>
        /// 开始码
        /// </summary>
        public int? StartCode { get; set; }

        /// <summary>
        /// 结束码
        /// </summary>
        public int? EndCode { get; set; }

        /// <summary>
        /// 分配数量
        /// 默认值：0
        /// </summary>
        public int? AllotCount { get; set; }

        /// <summary>
        /// 分配从公司名
        /// </summary>
        public string F_EnterpriseName { get; set; }

        /// <summary>
        /// 分配从公司ID
        /// </summary>
        public int F_EnterpriseId { get; set; }

        /// <summary>
        /// 分配往公司名
        /// </summary>
        public string T_EnterpriseName { get; set; }

        /// <summary>
        /// 分配往公司ID
        /// </summary>
        public int T_EnterpriseId { get; set; }

        /// <summary>
        /// 申请时间
        /// </summary>
        public DateTime? ApplyDate { get; set; }

        /// <summary>
        /// 分配时间
        /// </summary>
        public DateTime? AllotDate { get; set; }

        /// <summary>
        /// 申请人姓名
        /// </summary>
        public string ApplyUserName { get; set; }

        /// <summary>
        /// 申请人ID
        /// </summary>
        public int ApplyUserId { get; set; }
        //申请码类型：1防伪2物流
        public string ApplyCodeType { get; set; }
        /// <summary>
        /// 申请理由
        /// </summary>
        public string ApplyReason { get; set; }

        /// <summary>
        /// 是否审核通 0 末审核 1 通过  2 未通过
        /// 默认值：0
        /// </summary>
        public int HasVerifie { get; set; }

        /// <summary>
        /// 审核说明
        /// </summary>
        public string VerificationNotes { get; set; }


        [NotMapped]
        public string[] ArrCode { get; set; } //物流码数组
        [NotMapped]
        public int Type { get; set; } //类型 1 关联产品 2 关联批次

        [NotMapped]
        public string BatchName
        {
            get;
            set;
        }
        [NotMapped]
        public string ProductName
        {
            get;
            set;
        }
        public int ViewDel
        {
            get;
            set;
        }
        public int ApplyCount
        {
            get;
            set;
        } 
    }
}
